<?php



/**
 * Skeleton subclass for representing a row from the 'user_pulpit' table.
 *
 *
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    propel.generator.
 */
class UserPulpit extends BaseUserPulpit
{
	
	const TILE_BACKGROUND_DIR = '/resources/background/';
	
	public function setDefaultData($appId=null) {
		if ($appId !== null)
			$this->setApplicationId($appId);
		$this->setUsers(App_Auth::getInstance()->getUser());
		$this->setSize(0);
		$this->setBgFilename(null);
		$this->setDbOrder(0);
		$this->setVisible(1);
	}
	
	public function getBgFilename() {
		if (parent::getBgFilename() == '' || parent::getBgFilename() == null)
			return null;
		return self::TILE_BACKGROUND_DIR . parent::getBgFilename();
	}
	
	public function getDefaultBgFilename() {
		return parent::getBgFilename();
	}
	
}
